//
//  XYTDetailItemView.m
//  XYTPayOrderSystem
//
//  Created by wupeng on 2017/8/27.
//  Copyright © 2017年 wupeng. All rights reserved.
//

#import "XYTDetailItemView.h"

@implementation XYTDetailItemView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI{
    self.backgroundColor = [UIColor clearColor];
    
    UILabel *titleLab = [[UILabel alloc] initWithFrame:CGRectMake(18, 0, 60, boundsHeight)];
    titleLab.textColor = [UIColor lightGrayColor];
    titleLab.font = [UIFont systemFontOfSize:12];
    [self addSubview:titleLab];
    self.titleLab = titleLab;
    
    UILabel *dataLab = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(titleLab.frame), 0, boundsWidth-18-60-15, boundsHeight)];
    dataLab.textColor = [UIColor lightGrayColor];
    dataLab.font = [UIFont systemFontOfSize:12];
    dataLab.textAlignment = NSTextAlignmentRight;
    [self addSubview:dataLab];
    self.dataLab = dataLab;
    
    UIView *bottomLine = [[UIView alloc] initWithFrame:CGRectMake(0, boundsHeight- 1.0, boundsWidth, 1.0)];
    bottomLine.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:bottomLine];
    self.bottomLine = bottomLine;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
